import request from "@/utils/request";
import md5 from "md5";

export function getLoginVerificationCode(data) {
  return request({
    url: "/partner/getLoginVerificationCode",
    method: "post",
    data,
    noToken: true
  });
}

/**
 *
 * @param {Object} params
 */
export function LoginUser({
  UserAccount,
  UserPassword,
  LoginType = "Pwd",
  SMSCode
}) {
  return request({
    url: "/APP/LoginUser",
    method: "post",
    data: {
      UserAccount,
      UserPassword: md5(UserPassword),
      LoginType,
      SMSCode
    },
    noToken: true
  });
}

export function GetProductInfoList(data) {
  return request({
    url: "/api/APP/GetProductInfoList",
    method: "post",
    data
  });
}
export function GetProductInfoDetails(data) {
  return request({
    url: "/api/APP/GetProductInfoDetails",
    method: "post",
    data
  });
}
